<?php
/**
 * Created by PhpStorm.
 * User: heqian
 * Date: 17-4-21
 * Time: 下午9:40
 */
require_once 'Worker.php';
require_once 'events.php';
$app = new \Swoole\Worker('http://127.0.0.1:9501');
$app->server->on('packet', ['events','onPacket']);
$app->server->on('receive',['events','onReceive']);
//$app->server->on('message',['events','onMessage']);
$app->server->on('request',['events','onRequest']);
$app->run();